<template>
  <div
      class="gantt-block-row"
      :style="{
      top: `${(rowData.rawIndex + (isShowStatistics ? 1 : 0)) * cellHeight}px`,
      height: `${cellHeight}px`
    }"
  >
    <template v-for="blockItem in showList">
      <slot name="blockItem" :blockData="blockItem"/>
    </template>
  </div>
</template>

<script lang="ts" setup>
import {PropType, watch} from 'vue';
import {RowItem, GTArray} from "@/views/components/gantt/types.ts";

const props = defineProps({
  rowData: {
    type: Object as PropType<RowItem>,
    required: true
  },
  cellHeight: {
    type: Number as PropType<number>,
    required: true // 假设 cellHeight 是必需的，如果不是，可以移除 required: true
  },
  showList: {
    type: Array<GTArray>,
    default: () => {
      return []
    } // 假设 showList 是必需的，如果不是，可以移除 required: true
  },
  isShowStatistics: {
    type: Boolean,
    default: () => {
      return false
    }
  }
})

// watch(() => props.showList, () => {
//   console.log(props.showList);
// })
// console.log(props.showList);
</script>
